home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / tex / style / misc / doc.sty < prev    next >
Text File  |  1995-11-25  |  29KB  |  741 lines

  1. %% 
  2. %% This is file `doc.sty', generated 
  3. %% on <1992/12/17> with the docstrip utility (2.0r).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% doc.doc  (with options: `style')
  8. %% 
  9. %% Copyright (C) 1989-1992 by Frank Mittelbach. All rights reserved. 
  10. %% 
  11. %% This file is part of the doc package. 
  12. %% 
  13. %% IMPORTANT NOTICE: 
  14. %% 
  15. %% You are not allowed to change this file. You may however copy 
  16. %% this file to a file with a different name and then change the 
  17. %% copy if you obey the restrictions on file changes described in 
  18. %% readme.mz. 
  19. %% 
  20. %% You are NOT ALLOWED to distribute this file alone. You are NOT 
  21. %% ALLOWED to take money for the distribution or use of this file 
  22. %% (or a changed version) except for a nominal charge for copying 
  23. %% etc. 
  24. %% 
  25. %% You are allowed to distribute this file under the condition that 
  26. %% it is distributed together with all files mentioned in 
  27. %% readme.mz0. 
  28. %% 
  29. %% If you receive only some of these files from someone, complain! 
  30. %% 
  31. %% However, if these files are distributed by established suppliers 
  32. %% as part of a complete TeX distribution, and the structure of the 
  33. %% distribution would make it difficult to distribute the whole set 
  34. %% of files, *those parties* are allowed to distribute only some of 
  35. %% the files provided that it is made clear that the user will get 
  36. %% a complete distribution-set upon request to that supplier (not 
  37. %% me). Notice that this permission is not granted to the end 
  38. %% user. 
  39. %% 
  40. %% 
  41. %% For error reports in case of UNCHANGED versions see readme.mz 
  42. %% 
  43. %% 
  44. \let\ldots=\dots % MH
  45. \def\fileversion{v1.7k}
  46. \def\filedate{92/08/24}
  47. \def\docdate {92/08/28}
  48.  
  49. %% \CharacterTable
  50. %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  51. %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  52. %%   Digits        \0\1\2\3\4\5\6\7\8\9
  53. %%   Exclamation   \!     Double quote  \"     Hash (number) \#
  54. %%   Dollar        \$     Percent       \%     Ampersand     \&
  55. %%   Acute accent  \'     Left paren    \(     Right paren   \)
  56. %%   Asterisk      \*     Plus          \+     Comma         \,
  57. %%   Minus         \-     Point         \.     Solidus       \/
  58. %%   Colon         \:     Semicolon     \;     Less than     \<
  59. %%   Equals        \=     Greater than  \>     Question mark \?
  60. %%   Commercial at \@     Left bracket  \[     Backslash     \\
  61. %%   Right bracket \]     Circumflex    \^     Underscore    \_
  62. %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  63. %%   Right brace   \}     Tilde         \~}
  64. %%
  65.  
  66. %% Copyright (C) 1989-1992 Frank Mittelbach, all rights reserved.
  67. %%% \CharacterTable
  68. %%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  69. %%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  70. %%%   Digits        \0\1\2\3\4\5\6\7\8\9
  71. %%%   Exclamation   \!     Double quote  \"     Hash (number) \#
  72. %%%   Dollar        \$     Percent       \%     Ampersand     \&
  73. %%%   Acute accent  \'     Left paren    \(     Right paren   \)
  74. %%%   Asterisk      \*     Plus          \+     Comma         \,
  75. %%%   Minus         \-     Point         \.     Solidus       \/
  76. %%%   Colon         \:     Semicolon     \;     Less than     \<
  77. %%%   Equals        \=     Greater than  \>     Question mark \?
  78. %%%   Commercial at \@     Left bracket  \[     Backslash     \\
  79. %%%   Right bracket \]     Circumflex    \^     Underscore    \_
  80. %%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  81. %%%   Right brace   \}     Tilde         \~}
  82. %%%
  83. \@ifundefined{macro@cnt}{}{\endinput} \typeout{Style-Option: `doc'
  84. \fileversion \@spaces\space\space <\filedate> (FMi)} \typeout{English
  85.    Documentation \@spaces\@spaces\space <\docdate> (DLo, FMi, RMCS)}
  86. \catcode`\^^A=14
  87. \def\macrocode{\macro@code
  88.    \frenchspacing \@vobeyspaces
  89.    \xmacro@code}
  90. \def\macro@code{%
  91.    \topsep \MacrocodeTopsep
  92.    \@beginparpenalty \predisplaypenalty
  93.    \trivlist \parskip \z@ \item[]%
  94.    \macro@font
  95.    \leftskip\@totalleftmargin \advance\leftskip\MacroIndent
  96.    \rightskip\z@ \parindent\z@ \parfillskip\@flushglue
  97.    \blank@linefalse \def\par{\ifblank@line
  98.                              \leavevmode\fi
  99.                              \blank@linetrue\@@par
  100.                              \penalty\interlinepenalty}
  101.    \obeylines \let\do\@makeother \catcode`\`\active \@noligs \dospecials
  102.    \global\@newlistfalse
  103.    \global\@minipagefalse
  104.    \ifcodeline@index
  105.      \everypar{\global\advance\c@CodelineNo\@ne
  106.                \llap{\theCodelineNo\ \hskip\@totalleftmargin}%
  107.                \check@module}%
  108.    \else \everypar{\check@module}%
  109.    \fi
  110.    \init@crossref}
  111. \newif\ifblank@line
  112. \def\endmacrocode{%
  113.                  \ifpm@module \endgroup \pm@modulefalse \fi
  114.                  \everypar{}%
  115.                  \global\@inlabelfalse
  116.                  \endtrivlist
  117.                  \close@crossref}
  118. \@ifundefined{MacroFont}{%
  119.   \ifx\undefined\selectfont
  120.     \def\MacroFont{\small\tt}\else
  121.     \def\MacroFont{\math@fontsfalse\reset@font\small\tt}\fi
  122.   }{}
  123. \@ifundefined{AltMacroFont}{%
  124.   \ifx\undefined\selectfont
  125.     \def\AltMacroFont{\small\tt}\else
  126.     \def\AltMacroFont{\math@fontsfalse\small\reset@font\it\tt}\fi
  127.   }{}
  128. \let\macro@font=\MacroFont
  129. \def\check@module{%
  130.   \ifcheck@modules
  131.     \ifpm@module \endgroup \pm@modulefalse \fi
  132.     \expandafter\futurelet\expandafter\next\expandafter\ch@percent
  133.   \fi}
  134. \newif\ifpm@module
  135. \def\DontCheckModules{\check@modulesfalse}
  136. \def\CheckModules{\check@modulestrue}
  137. \newif\ifcheck@modules  \check@modulestrue
  138. \def\ch@percent{%
  139.   \if \percentchar\next
  140.     \expandafter\check@angle
  141.   \fi}
  142. \def\check@angle#1{\futurelet\next\ch@angle}
  143. \def\ch@angle{\if<\next
  144.     \expandafter\ch@plus@etc
  145.   \else \percentchar \fi}
  146. \def\ch@plus@etc<{\futurelet\next\check@plus@etc}
  147. \def\check@plus@etc{%
  148.     \if +\next
  149.       \let\next\pm@module
  150.     \else\if -\next
  151.       \let\next\pm@module
  152.     \else\if *\next
  153.       \let\next\star@module
  154.     \else\if /\next
  155.       \let\next\slash@module
  156.     \else
  157.       \let\next\pm@module
  158.     \fi\fi\fi\fi
  159.     \next}
  160. \def\pm@module#1>{\pm@moduletrue
  161.    \Module{#1}\begingroup
  162.      \advance\guard@level\@ne
  163.      \ifnum\guard@level>\c@StandardModuleDepth\AltMacroFont\fi
  164. }
  165. \def\star@module#1>{%
  166.   \Module{#1}%
  167.   \global \advance \guard@level\@ne
  168.   \ifnum \guard@level>\c@StandardModuleDepth
  169.     \global\let\macro@font=\AltMacroFont \macro@font
  170.   \fi}
  171. \def\slash@module#1>{%
  172.   \Module{#1}%
  173.   \global \advance \guard@level\m@ne
  174.   \ifnum \guard@level=\c@StandardModuleDepth
  175.     \global\let\macro@font\MacroFont  \macro@font
  176.   \fi
  177. }
  178. \newcounter{StandardModuleDepth}
  179. \newcount \guard@level
  180. \@ifundefined{Module}{%
  181.   \ifx\undefined\selectfont
  182.     \def\Module#1{{\mod@math@codes$\fam\sffam\langle #1\rangle$}}
  183.   \else
  184.     \expandafter\ifx\csname ds@oldlfont\endcsname\relax
  185.       \def\Module#1{{\mod@math@codes$\langle\sfmath{#1}\rangle$}}
  186.     \else
  187.       \def\Module#1{{\mod@math@codes$\langle{\sfmath #1}\rangle$}}
  188.     \fi
  189.   \fi}{}
  190. \def\mod@math@codes{\mathcode`\|="226A \mathcode`\&="2026}
  191. \ifx\selectfont\undefined
  192. \else
  193.   \ifx\sfmath\undefined
  194.     \newmathalphabet*{\sfmath}{\sfdefault}{m}{n}\fi
  195. \fi
  196. \newskip\MacrocodeTopsep \MacrocodeTopsep = 3pt plus 1.2pt minus 1pt
  197. \newdimen\MacroIndent
  198. \settowidth\MacroIndent{\rm\scriptsize 00\ }
  199. \@namedef{macrocode*}{\macro@code\sxmacro@code}
  200. \expandafter\let\csname endmacrocode*\endcsname = \endmacrocode
  201. \catcode`\!=\catcode`\%   ^^A In this section there must not be
  202.                               ^^A any exclamation marks.
  203.                               ^^A
  204. \begingroup
  205. \catcode`\|=\z@ \catcode`\[=\@ne \catcode`\]=\tw@
  206. \catcode`\{=12 \catcode`\}=12
  207. \catcode`\%=12 \catcode`\ =\active \catcode`\\=\active
  208. !%    \end{macrocode*}
  209. !    Next follows the actual definition of  \verb+\macro@code+;
  210. !    notice the
  211. !    use of the new escape character.  We manage to get the argument
  212. !    surrounded by the string \verb+\end{macrocode}+, but at the end
  213. !    however, in spite of the actual characters used during the
  214. !    definition of
  215. !    this macro, \verb+\end+ with the argument \verb+{macrocode}+
  216. !    will be executed, to ensure a balanced environment.
  217. !    \begin{macrocode*}
  218. |gdef|xmacro@code#1%    \end{macrocode}[#1|end[macrocode]]
  219. !%    \end{macrocode*}
  220. ! \begin{macro}{\sxmacro@code}
  221. !    The definition of \verb+\sxmacro@code+ is completely analogous,
  222. !    only
  223. !    here a slightly different terminating string will be used.
  224. !    Note that the space is not active in this environment.
  225. !    \begin{macrocode}
  226. |catcode`| =12
  227. |gdef|sxmacro@code#1%    \end{macrocode*}[#1|end[macrocode*]]
  228. !%    \end{macrocode}
  229. !    because the \verb+\catcode+ changes have been made local by
  230. !    commencing a
  231. !    new group, there now follows the matching \verb+\endgroup+
  232. !    in a rather
  233. !    unusual style of writing.
  234. !    \begin{macrocode}
  235. |endgroup
  236. !%    \end{macrocode}
  237. \catcode`\!=12
  238. \def\DescribeMacro{\leavevmode\@bsphack
  239.    \begingroup\MakePrivateLetters\Describe@Macro}
  240. \def\Describe@Macro#1{\endgroup
  241.               \marginpar{\raggedleft\PrintDescribeMacro{#1}}%
  242.               \SpecialUsageIndex{#1}\@esphack\ignorespaces}
  243. \def\DescribeEnv{\leavevmode\@bsphack\begingroup\MakePrivateLetters
  244.   \Describe@Env}
  245. \def\Describe@Env#1{\endgroup
  246.               \marginpar{\raggedleft\PrintDescribeEnv{#1}}%
  247.               \SpecialEnvIndex{#1}\@esphack\ignorespaces}
  248. \reversemarginpar
  249. \setlength\marginparpush{0pt}  \setlength\marginparwidth{8pc}
  250. {\catcode`\|=\z@ \catcode`\\=12
  251. |gdef|bslash{\}}
  252. \def\verbatim{\@beginparpenalty \predisplaypenalty \@verbatim
  253.               \MacroFont \frenchspacing \@vobeyspaces \@xverbatim}
  254. \@namedef{verbatim*}{\@beginparpenalty \predisplaypenalty \@verbatim
  255.               \MacroFont \@sxverbatim}
  256. \def\@verbatim{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
  257.       \leftskip\@totalleftmargin\rightskip\z@
  258.       \parindent\z@\parfillskip\@flushglue\parskip\z@
  259.       \@@par
  260.       \@tempswafalse
  261.  \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par
  262.           \penalty\interlinepenalty
  263.    \check@percent}%
  264.  \obeylines \catcode`\`\active \@noligs \let\do\@makeother
  265.  \dospecials}
  266. {\catcode`\%=12
  267.  \long\gdef\check@percent#1{\ifx #1%\let\next\@empty \else
  268.                                     \let\next=#1\fi \next}}
  269. \begingroup
  270.   \lccode`\~=`\^^M
  271.   \lowercase{%
  272.     \gdef\verb{\relax
  273.       \ifmmode \hbox \else \leavevmode\null \fi
  274.       \bgroup
  275.       \tt   \catcode`\`\active \@noligs
  276.       \let~\verb@err
  277.       \catcode`\^^M\active
  278.       \let\do\@makeother \dospecials
  279.       \@ifstar\@sverb{\@vobeyspaces \frenchspacing \@sverb}}}
  280. \endgroup
  281. \def\verb@err{\egroup\@latexerr{\string\verb\space
  282.                command ended by end of line.}\@ehc}
  283. \def\@sverb#1{%
  284.   \catcode`#1\active  \lccode`\~`#1%
  285.   \lowercase{\let~\egroup}}
  286. \newcount\macro@cnt \macro@cnt=0
  287. \newcount\macro@level \macro@level=0
  288. \def\macro{%
  289.    \ifnum\macro@level=\z@ \begingroup \fi
  290.    \catcode`\\12
  291.    \MakePrivateLetters \m@cro@}
  292. \long\def\m@cro@#1{\endgroup \topsep\MacroTopsep \trivlist
  293.    \advance\macro@level\@ne
  294.    \edef\saved@macroname{\string#1}%
  295.   \def\makelabel##1{\llap{##1}}%
  296.   \if@inlabel
  297.     \let\@tempa\@empty \count@\macro@cnt
  298.     \loop \ifnum\count@>\z@
  299.       \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne \repeat
  300.     \edef\makelabel##1{\llap{\vtop to\baselineskip
  301.                                {\@tempa\hbox{##1}\vss}}}%
  302.     \advance \macro@cnt \@ne
  303.   \else  \macro@cnt\@ne  \fi
  304.   \edef\@tempa{\noexpand\item[\noexpand\PrintMacroName{\string#1}]}%
  305.   \@tempa
  306.   {\advance\c@CodelineNo\@ne\SpecialMainIndex{#1}\nobreak}%
  307.   \DoNotIndex{#1}%
  308.   \ignorespaces}
  309. \def\endmacro{%
  310.    \endtrivlist
  311.    \ifnum\macro@level>\@ne \advance\macro@level\m@ne \begingroup \fi}
  312. \newskip\MacroTopsep     \MacroTopsep = 7pt plus 2pt minus 2pt
  313. \@ifundefined{PrintMacroName}
  314.    {\def\PrintMacroName#1{\strut \MacroFont \string #1\ }}{}
  315. \@ifundefined{PrintDescribeMacro}
  316.    {\def\PrintDescribeMacro#1{\strut \MacroFont \string #1\ }}{}
  317. \@ifundefined{PrintDescribeEnv}
  318.    {\def\PrintDescribeEnv#1{\strut \MacroFont #1\ }}{}
  319. \begingroup
  320. \catcode`\~\active
  321. \gdef\SpecialEscapechar#1{%
  322.     \begingroup
  323.      \uccode`\~`#1%
  324.      \uppercase{\gdef\active@escape@char{~}}%
  325.      \escapechar\m@ne  \xdef\special@escape@char{\string#1}%
  326.    \endgroup}
  327. \endgroup
  328. \begingroup   \catcode`\|=\z@  \catcode`\\=\active
  329. |gdef|init@crossref{|catcode`|\|active   |let\|bslash
  330.     |MakePrivateLetters
  331.     |catcode|expandafter`|special@escape@char|active
  332.     |expandafter|let|active@escape@char|scan@macro}
  333. |endgroup
  334. \SpecialEscapechar{\\}
  335. \@ifundefined{MakePrivateLetters}
  336.     {\let\MakePrivateLetters\makeatletter}{}
  337. \def\close@crossref{\SpecialEscapechar\\}
  338. \def\scan@macro{%
  339.    \special@escape@char
  340.    \step@checksum
  341.    \ifscan@allowed
  342.       \let\macro@namepart\@empty
  343.       \def\next{\futurelet\next\macro@switch}%
  344.    \else \let\next\@empty \fi
  345.    \next}
  346. \newif\ifscan@allowed    \scan@allowedtrue
  347. \def\DisableCrossrefs{\@bsphack\scan@allowedfalse\@esphack}
  348. \def\EnableCrossrefs{\@bsphack\scan@allowedtrue
  349.                      \def\DisableCrossrefs{\@bsphack\@esphack}\@esphack}
  350. \def\macro@switch{\ifcat\noexpand\next a%
  351.      \let\next\macro@name
  352.      \else \let\next\short@macro  \fi
  353.    \next}
  354. \def\short@macro#1{\begingroup
  355.    \catcode`\&=11  \uccode`\&=\expandafter`\string#1%
  356.    \uppercase{\def\macro@namepart{&}}%
  357.    \endgroup
  358.    \ifnot@excluded
  359.      \produce@index{#1}\fi
  360.     \scan@allowedfalse#1%
  361.     \scan@allowedtrue }
  362. \def\produce@index#1{%
  363.   \if\noexpand#1\special@escape@char
  364.      \scan@allowedfalse \it@is@a\special@escape@char \else
  365.      \if\noexpand#1\bslash \it@is@a\bslash \else
  366.        \if\noexpand#1\space \it@is@a\space \else
  367.          \ifx#1\par
  368.          \it@is@a\space \else
  369.          \ifx#1\relax \else
  370.            \if\noexpand#1\bgroup \LeftBraceIndex \else
  371.              \if\noexpand#1\egroup \RightBraceIndex \else
  372.                \if\noexpand#1\percentchar \PercentIndex \else
  373.                  \it@is@a{\string#1}%
  374.        \fi \fi \fi \fi \fi \fi \fi \fi}
  375. \def\macro@name#1{\edef\macro@namepart{\macro@namepart#1}%
  376.      \futurelet\next\more@macroname}
  377. \def\more@macroname{\ifcat\noexpand\next a%
  378.      \let\next\macro@name
  379.      \else \let\next\macro@finish \fi
  380.      \next}
  381. \def\macro@finish{%
  382.   \macro@namepart
  383.   \ifnot@excluded
  384.      \edef\@tempa{\noexpand\SpecialIndex{\bslash\macro@namepart}}%
  385.      \@tempa  \fi}
  386. \def\DoNotIndex{\begingroup \MakePrivateLetters
  387.     \catcode`\\12
  388.     \do@not@index}
  389. \long\def\do@not@index#1{%
  390.     \endgroup
  391.     \addto@hook\index@excludelist{#1,}}
  392. \long\def\addto@hook#1#2{#1\expandafter{\the#1#2}}
  393. \newtoks\index@excludelist
  394. \index@excludelist{}
  395. \begingroup
  396. \catcode`\|=0%
  397. \catcode`\\=12
  398. |gdef|ifnot@excluded{|expandafter
  399.      |expanded@notin|expandafter{|expandafter
  400.      \|macro@namepart,}{|the|index@excludelist}}
  401. |endgroup
  402. \def\expanded@notin#1#2{%
  403.  \def\in@@##1#1##2##3\in@@{%
  404.   \ifx\expanded@notin##2}%
  405.  \expandafter\in@@#2#1\expanded@notin\in@@}
  406. \@ifundefined{actualchar}{\def\actualchar{=}}{}
  407. \@ifundefined{quotechar}{\def\quotechar{!}}{}
  408. \@ifundefined{levelchar}{\def\levelchar{>}}{}
  409. \@ifundefined{encapchar}{\def\encapchar{|}}{}
  410. \@ifundefined{verbatimchar}{\def\verbatimchar{+}}{}
  411. \def\SpecialIndex#1{\@bsphack\special@index{\expandafter\@gobble
  412.                                       \string#1\actualchar
  413.       \string\verb\quotechar*\verbatimchar\string#1\verbatimchar}%
  414.     \@esphack}
  415.  
  416. \def\SpecialMainIndex#1{\@bsphack\special@index{\expandafter\@gobble
  417.                                         \string#1\actualchar
  418.                                         \string\verb
  419.                                         \quotechar*\verbatimchar
  420.                                         \string#1\verbatimchar
  421.                                         \encapchar main}%
  422.                         \@esphack}
  423. \def\SpecialUsageIndex#1{\@bsphack\index{\expandafter\@gobble\string#1%
  424.     \actualchar\string\verb\quotechar*\verbatimchar
  425.     \string#1\verbatimchar
  426.     \encapchar usage}\@esphack}
  427. \def\SpecialEnvIndex#1{\@bsphack
  428.     \index{#1\actualchar{\tt #1} (environment)\encapchar usage}%
  429.     \index{environments:\levelchar{\tt #1}\encapchar usage}\@esphack}
  430. \def\SortIndex#1#2{\index{#1\actualchar#2}}
  431. \def\it@is@a#1{\special@index{\quotechar #1\actualchar
  432.                           \string\verb\quotechar*\verbatimchar
  433.                           \quotechar\bslash\quotechar#1\verbatimchar}}
  434. \@ifundefined{LeftBraceIndex}{\def\LeftBraceIndex{%
  435.    \special@index{\bgroup\actualchar\string\verb\quotechar*\verbatimchar
  436.           \quotechar\bslash{\verbatimchar\string\iffalse}\string\fi}}}{}
  437.  
  438. \@ifundefined{RightBraceIndex}{\def\RightBraceIndex{%
  439.  \special@index{\egroup\actualchar\string\iffalse{\string\fi\string\verb
  440.            \quotechar*\verbatimchar\quotechar\bslash}\verbatimchar}}}{}
  441. \@ifundefined{PercentIndex}
  442.   {\def\PercentIndex{\it@is@a\percentchar}}{}
  443. \def\OldMakeindex{\def\PercentIndex{%
  444.     \special@index{\quotechar\percentchar\actualchar\string\verb
  445.            \quotechar*\verbatimchar\quotechar\bslash
  446.            \percentchar\percentchar\verbatimchar}}}
  447. {\catcode`\%=12 \gdef\percentchar{%}}
  448. \newif\ifhave@multicol
  449. \openin\@ne multicol.sty
  450. \ifeof\@ne \else \have@multicoltrue \fi
  451. \closein\@ne \relax
  452. \ifhave@multicol \input{multicol.sty} \fi
  453. \newdimen\IndexMin         \IndexMin       = 80pt
  454. \newcount\c@IndexColumns   \c@IndexColumns = 3
  455. \ifhave@multicol
  456.   \renewenvironment{theindex}
  457.     {\begin{multicols}\c@IndexColumns[\index@prologue][\IndexMin]%
  458.       \IndexParms \let\item\@idxitem \ignorespaces}%
  459.     {\end{multicols}}
  460. \else
  461.   \typeout{Can't find multicols.sty -- will use normal index layout if
  462.      necessary.}
  463.   \def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
  464.     \columnseprule \z@  \columnsep 35\p@
  465.     \twocolumn[\index@prologue]%
  466.     \IndexParms \let\item\@idxitem \ignorespaces}
  467.   \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}
  468. \fi
  469. \long\def\IndexPrologue#1{\@bsphack\def\index@prologue{#1}\@esphack}
  470. \@ifundefined{index@prologue}
  471.      {\def\index@prologue{\section*{Index}%
  472.                  \markboth{Index}{Index}%
  473.                  The italic numbers denote the pages where the
  474.                  corresponding entry is described,
  475.                  numbers underlined point to the definition,
  476.                  all others indicate the places where it is used.
  477.                  }}{}
  478. \@ifundefined{IndexParms}
  479.     {\def\IndexParms{%
  480.        \parindent \z@
  481.        \columnsep 15pt
  482.        \parskip 0pt plus 1pt
  483.        \rightskip 15pt
  484.        \mathsurround \z@
  485.        \parfillskip=-15pt
  486.         \small
  487.        \def\@idxitem{\par\hangindent 30pt}%
  488.        \def\subitem{\@idxitem\hspace*{15pt}}%
  489.        \def\subsubitem{\@idxitem\hspace*{25pt}}%
  490.        \def\indexspace{\par\vspace{10pt plus 2pt minus 3pt}}%
  491.       }}{}
  492. \def\efill{\hfill\nopagebreak}%
  493. \def\dotfill{\leaders\hbox to.6em{\hss .\hss}\hskip\z@ plus  1fill}%
  494. \def\dotfil{\leaders\hbox to.6em{\hss .\hss}\hfil}%
  495. \def\pfill{\unskip~\dotfill\penalty500\strut\nobreak
  496.                \dotfil~\ignorespaces}%
  497. \def\*{\leavevmode\lower.8ex\hbox{$\,\widetilde{\ }\,$}}
  498. \@ifundefined{main}{\def\main#1{\underline{#1}}}{}
  499. \@ifundefined{usage}{\def\usage#1{{\it #1}}}{}
  500. \def\PrintIndex{\@input{\jobname.ind}}
  501. \def\printindex{\typeout{\string\printindex\space is obsolete!}%
  502.                 \typeout{Please use \string\PrintIndex\space
  503.                          if you are a macro implementor^^J
  504.                          or get a newer version of the documented
  505.                          software if you are a user}%
  506.                 \PrintIndex}
  507. \def\changes{\@bsphack\begingroup\@sanitize
  508.    \catcode`\\\z@ \catcode`\ 10 \MakePercentIgnore
  509.    \changes@}
  510. \def\changes@#1#2#3{%
  511.   \def\protect##1{\string##1\space}%
  512.   \edef\@tempa{\noexpand\glossary{#1\levelchar
  513.                                  \expandafter\@gobble
  514.                                  \saved@macroname\actualchar
  515.                                  \string\verb\quotechar*%
  516.                                  \verbatimchar\saved@macroname
  517.                                  \verbatimchar:\levelchar #3}}%
  518.   \@tempa\endgroup\@esphack}
  519. \def\saved@macroname{"General"}
  520. \let\RecordChanges\makeglossary
  521. \newdimen\GlossaryMin         \GlossaryMin       = 80pt
  522. \newcount\c@GlossaryColumns   \c@GlossaryColumns = 2
  523. \ifhave@multicol
  524.   \newenvironment{theglossary}{%
  525.     \begin{multicols}\c@GlossaryColumns
  526.                      [\glossary@prologue][\GlossaryMin]%
  527.     \GlossaryParms \let\item\@idxitem \ignorespaces}%
  528.    {\end{multicols}}
  529. \else
  530.   \newenvironment{theglossary}{%
  531.       \@restonecoltrue\if@twocolumn\@restonecolfalse\fi
  532.       \columnseprule \z@  \columnsep 35\p@
  533.       \twocolumn[\glossary@prologue]%
  534.       \GlossaryParms \let\item\@idxitem \ignorespaces}
  535.     {\if@restonecol\onecolumn\else\clearpage\fi}
  536. \fi
  537. \long\def\GlossaryPrologue#1{\@bsphack
  538.                              \def\glossary@prologue{#1}%
  539.                              \@esphack}
  540. \@ifundefined{glossary@prologue}
  541.      {\def\glossary@prologue{\section*{{Change History}}%
  542.                  \markboth{{Change History}}{{Change History}}%
  543.                  }}{}
  544. \@ifundefined{GlossaryParms}{\let\GlossaryParms\IndexParms}{}
  545. \def\PrintChanges{\@input{\jobname.gls}}
  546. \long\def\StopEventually#1{\@bsphack\gdef\Finale{#1%
  547.               \check@checksum}%
  548.            \init@checksum
  549.            \@esphack}
  550. \def\OnlyDescription{\@bsphack\long\def\StopEventually##1{%
  551.            ##1\endinput}\@esphack}
  552. \begingroup
  553. \obeyspaces%
  554. \catcode`\^^M\active%
  555. \gdef\meta{\begingroup\obeyspaces\catcode`\^^M\active%
  556. \let^^M\do@space\let \do@space%
  557. \def\-{\egroup\discretionary{-}{}{}\hbox\bgroup\it}%
  558. \m@ta}%
  559. \endgroup
  560. \def\m@ta#1{\leavevmode\hbox\bgroup$\langle$\it#1\/$\rangle$\egroup
  561.     \endgroup}
  562. \def\do@space{\egroup\space
  563.     \hbox\bgroup\it\futurelet\next\sp@ce}
  564. \def\sp@ce{\ifx\next\do@space\expandafter\sp@@ce\fi}
  565. \def\sp@@ce#1{\futurelet\next\sp@ce}
  566. \def\IndexInput#1{%
  567.      \begingroup \macro@code
  568.    \frenchspacing \@vobeyspaces
  569.      \input{#1}\endmacrocode
  570.      \endgroup}
  571. \def\maketitle{\par
  572.       \begingroup \def \thefootnote {\fnsymbol {footnote}}%
  573.       \setcounter {footnote}\z@
  574.       \def \@makefnmark {\hbox to \z@{$^{\@thefnmark }$\hss }}%
  575.       \if@twocolumn \twocolumn [\@maketitle ]%
  576.       \else \newpage \global \@topnum \z@ \@maketitle \fi
  577.        \thispagestyle{titlepage}\@thanks \endgroup
  578.       \setcounter {footnote}\z@
  579.       \gdef\@date{\today}\gdef\@thanks{}%
  580.       \gdef\@author{}\gdef\@title{}}
  581. \@ifundefined{ps@titlepage}
  582.     {\let\ps@titlepage=\ps@plain}{}
  583. \def\MakeShortVerb#1{%
  584.   \typeout{*** Made \expandafter\@gobble\string#1\space a short
  585.            reference for \string\verb \on@line\space ***}%
  586.   \add@special{#1}%
  587.   \expandafter
  588.   \xdef\csname cc\string#1\endcsname{\the\catcode`#1}%
  589.   \begingroup
  590.     \catcode`\~\active  \lccode`\~`#1%
  591.     \lowercase{%
  592.     \global\expandafter\let
  593.        \csname ac\string#1\endcsname~%
  594.     \gdef~{\verb~}}%
  595.   \endgroup
  596.   \global\catcode`#1\active}
  597. \def\DeleteShortVerb#1{%
  598.   \expandafter\ifx\csname cc\string#1\endcsname\relax
  599.   \else
  600.     \typeout{*** Deleted \expandafter\@gobble\string#1\space as short
  601.              reference for \string\verb \on@line\space ***}%
  602.     \rem@special{#1}%
  603.     \global\catcode`#1\csname cc\string#1\endcsname
  604.     \ifnum\catcode`#1=\active
  605.       \begingroup
  606.         \catcode`\~\active   \lccode`\~`#1%
  607.         \lowercase{%
  608.           \global\expandafter\let\expandafter~%
  609.           \csname ac\string#1\endcsname}%
  610.       \endgroup \fi \fi}
  611. \def\add@special#1{%
  612.   \rem@special{#1}%
  613.   \expandafter\gdef\expandafter\dospecials\expandafter
  614.     {\dospecials \do #1}%
  615.   \expandafter\gdef\expandafter\@sanitize\expandafter
  616.     {\@sanitize \@makeother #1}}
  617. \def\rem@special#1{%
  618.   \def\do##1{%
  619.     \ifnum`#1=`##1 \else \noexpand\do\noexpand##1\fi}%
  620.   \xdef\dospecials{\dospecials}%
  621.   \begingroup
  622.     \def\@makeother##1{%
  623.       \ifnum`#1=`##1 \else \noexpand\@makeother\noexpand##1\fi}%
  624.     \xdef\@sanitize{\@sanitize}%
  625.   \endgroup}
  626. \def\MakeShortverb{\typeout{*** Switch to \noexpand\MakeShortVerb
  627.                          syntax, this is obsolete ***}\MakeShortVerb}
  628. \def\DeleteShortverb{\typeout{*** Switch to \noexpand\DeleteShortVerb
  629.                          syntax, this is obsolete ***}\DeleteShortVerb}
  630. \def\init@checksum{\relax
  631.     \global\bslash@cnt\z@}
  632. \def\check@checksum{\relax
  633.      \ifnum\check@sum=\z@
  634.        \typeout{**********************************}%
  635.        \typeout{* This macro file has no checksum!}%
  636.        \typeout{* The checksum should be \the\bslash@cnt!}%
  637.        \typeout{**********************************}%
  638.      \else
  639.        \ifnum\check@sum=\bslash@cnt
  640.          \typeout{*******************}%
  641.          \typeout{* Checksum passed *}%
  642.          \typeout{*******************}%
  643.        \else
  644.          \errhelp\wrong@checksum
  645.          \errmessage{Checksum not passed
  646.                     (\the\check@sum<>\the\bslash@cnt)}%
  647.         \fi
  648.      \fi
  649.      \global\check@sum\z@}
  650. \newcount\check@sum           \check@sum  = \z@
  651. \newcount\bslash@cnt          \bslash@cnt = \z@
  652. \newhelp\wrong@checksum
  653.    {The currently documented file seems to be wrong.^^J%
  654.     Try to get a correct version.}%
  655. \def\CheckSum#1{\@bsphack\global\check@sum#1\relax\@esphack}
  656. \def\step@checksum{\global\advance\bslash@cnt\@ne}
  657. \def\CharacterTable{\begingroup \CharTableChanges \character@table}
  658. \begingroup
  659.   \catcode`\~=11
  660.   \gdef\character@table#1{\def\used~table{#1}%
  661.       \ifx\used~table\default~table
  662.            \typeout{***************************}%
  663.            \typeout{* Character table correct *}%
  664.            \typeout{***************************}%
  665.       \else
  666.          \errhelp\wrong@table
  667.          \errmessage{Character table corrupted}%
  668.          \show\default~table
  669.          \show\used~table
  670.       \fi
  671.       \endgroup}
  672.   \global\let\CharTableChanges\@empty
  673.   \makeatother
  674.   \gdef\default~table
  675.      {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  676.       Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  677.       Digits        \0\1\2\3\4\5\6\7\8\9
  678.       Exclamation   \!     Double quote  \"     Hash (number) \#
  679.       Dollar        \$     Percent       \%     Ampersand     \&
  680.       Acute accent  \'     Left paren    \(     Right paren   \)
  681.       Asterisk      \*     Plus          \+     Comma         \,
  682.       Minus         \-     Point         \.     Solidus       \/
  683.       Colon         \:     Semicolon     \;     Less than     \<
  684.       Equals        \=     Greater than  \>     Question mark \?
  685.       Commercial at \@     Left bracket  \[     Backslash     \\
  686.       Right bracket \]     Circumflex    \^     Underscore    \_
  687.       Grave accent  \`     Left brace    \{     Vertical bar  \|
  688.       Right brace   \}     Tilde         \~}
  689. \endgroup
  690.   \newhelp\wrong@table{Some of the ASCII characters are corrupted.^^J
  691.             I now \string\show\space you both tables for comparison.}
  692. \newif\ifcodeline@index \codeline@indexfalse
  693. \def\codeline@wrindex#1{\if@filesw
  694.         \immediate\write\@indexfile
  695.             {\string\indexentry{#1}%
  696.             {\number\c@CodelineNo}}\fi}
  697. \let\special@index = \@gobble
  698. \def\CodelineIndex{\makeindex
  699.                    \codeline@indextrue
  700.                    \let\special@index\codeline@wrindex}
  701. \def\PageIndex{\makeindex
  702.                \codeline@indexfalse
  703.                \let\special@index\index}
  704. \newcount\c@CodelineNo  \c@CodelineNo\z@
  705. \@ifundefined{theCodelineNo}
  706.   {\ifx\selectfont\undefined
  707.      \def\theCodelineNo{\rm\scriptsize\arabic{CodelineNo}}%
  708.    \else
  709.      \def\theCodelineNo{\reset@font\scriptsize\arabic{CodelineNo}}%
  710.    \fi}
  711.   {}
  712.        \tolerance=1000\relax
  713. { \catcode`\"=12
  714.   \global\mathcode`\\="705C \global\mathcode`\@="7040 }
  715. \@ifundefined{DocstyleParms}{}{}
  716. \DocstyleParms     \let\DocstyleParms\relax
  717. \@ifundefined{AmSTeX}
  718.    {\def\AmSTeX{\leavevmode\hbox{$\cal A\kern-.2em\lower.376ex%
  719.         \hbox{$\cal M$}\kern-.2em\cal S$-\TeX}}}{}
  720. \@ifundefined{BibTeX}
  721.    {\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em%
  722.     T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}}{}
  723. \@ifundefined{SliTeX}
  724.    {\def\SliTeX{{\rm S\kern-.06emL\kern-.18em\raise.32ex\hbox
  725.                 {\sc i}\kern -.03em\TeX}}}{}
  726. \@ifundefined{PlainTeX}{\def\PlainTeX{{\sc Plain}\kern2pt\TeX}}{}
  727. \@ifundefined{Web}{\def\Web{{\sc Web}}}{}
  728. \def\MakePercentIgnore{\catcode`\%9\relax}
  729. \def\MakePercentComment{\catcode`\%14\relax}
  730. \def\DocInput#1{\MakePercentIgnore\input{#1}\MakePercentComment}
  731. \ifx\on@line\undefined
  732.   \def\on@line{ on input line \the\inputlineno}
  733.   \errhelp{Support for input line numbers has been added
  734.            to latex.tex <dec91>.^^J^^J%
  735.            Please update to a newer LaTeX release.}
  736.   \errmessage{Obsolete LaTeX release (older than Dec.91)}
  737. \fi
  738. \endinput
  739. %% 
  740. %% End of file `doc.sty'.
  741.